package com.bluesky.log;

import org.springframework.stereotype.Component;

@Component
public class ThreadLocalUserNameProvider implements IUserNameProvider{

    private ThreadLocal<String> userNameTl = new ThreadLocal<>();
    @Override
    public String getUserName() {
        return this.userNameTl.get();
    }

    @Override
    public void setUserName(String userName) {
        this.userNameTl.set(userName);
    }
}
